package innerclass_;

public class StaticInnerClass {
    public static void main(String[] args) {
        Outer06 outer06 = new Outer06();
        outer06.fun();
    }
}
class Outer06{
    private int n1 =10;
    public static int n2=200;
    private static String name="张三";

    //静态内部类，作用域 整个类体，
    public static class Inner{
        public void say(){
            System.out.println("n2="+n2+"  name: "+name);//只能访问静态的成员方法和变量，包括私有的
        }
    }


    public void fun(){
        Inner inner = new Inner();
        inner.say();
    }
}